workspace "EasyNetSim"
	architecture "x64"

	configurations
	{
		"Debug",
		"Release",
		"Dist"
	}

outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

IncludeDir = {}
IncludeDir["MyJSONParser"] = "EasyNetSim/vendor/MyJSONParser/MyJSONParser/src"
IncludeDir["MyTextFileReaderAndWriter"] = "EasyNetSim/vendor/MyTextFileReaderAndWriter/MyTextFileReaderAndWriter/src"

include "EasyNetSim/vendor/MyJSONParser/premake5_link.lua"
include "EasyNetSim/vendor/MyTextFileReaderAndWriter/premake5_link.lua"

project "EasyNetSim"
	location "EasyNetSim"
	kind "ConsoleApp"
	language "C++"

	targetdir ("bin/" .. outputdir .. "/%{prj.name}")
	objdir ("bin-int/" .. outputdir .. "/%{prj.name}")

	files
	{
		"%{prj.name}/src/**.h",
		"%{prj.name}/src/**.cpp"
	}

	includedirs
	{
		"%{prj.name}/src",
		"%{IncludeDir.MyJSONParser}",
		"%{IncludeDir.MyTextFileReaderAndWriter}"
	}

	links
	{
		"MyJSONParser",
		"MyTextFileReaderAndWriter"
	}

	filter "system:windows"
		cppdialect "C++17"
		staticruntime "On"
		systemversion "latest"

	filter "configurations:Debug"
		defines "ENS_DEBUG"
		runtime "Debug"
		symbols "On"

	filter "configurations:Release"
		defines "ENS_RELEASE"
		runtime "Release"
		optimize "On"
	
	filter "configurations:Dist"
		defines "ENS_DIST"
		optimize "On"